import { ref } from "vue";
import { type Pro } from "./model";
import { queryPro } from "./http";

export const pros = ref<Pro[]>([]);
export const selectPro = ref<Pro | null>(null);

export async function updatePro() {
  pros.value = await queryPro();
	if (pros.value.length != 0) {
		selectPro.value = pros.value[0];
	} else {
		selectPro.value = null;
	}
}





